require(reshape2)
## Loading required package: reshape2
require(ggplot2)
## Loading required package: ggplot2
require(scales)
## Loading required package: scales
require(ggthemes)
## Loading required package: ggthemes
require(ggridges)
## Loading required package: ggridges
## 
## Attaching package: 'ggridges'
## The following object is masked from 'package:ggplot2':
## 
##     scale_discrete_manual
require(latex2exp)
## Loading required package: latex2exp
require(lme4)
## Loading required package: lme4
## Loading required package: Matrix
require(lmerTest)
## Loading required package: lmerTest
## 
## Attaching package: 'lmerTest'
## The following object is masked from 'package:lme4':
## 
##     lmer
## The following object is masked from 'package:stats':
## 
##     step
require(relaimpo)
## Loading required package: relaimpo
## Loading required package: MASS
## Loading required package: boot
## Loading required package: survey
## Loading required package: grid
## Loading required package: survival
## 
## Attaching package: 'survival'
## The following object is masked from 'package:boot':
## 
##     aml
## 
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
## 
##     dotchart
## Loading required package: mitools
## This is the global version of package relaimpo.
## If you are a non-US user, a version with the interesting additional metric pmvd is available
## from Ulrike Groempings web site at prof.beuth-hochschule.de/groemping.
require(tidyverse)
## Loading required package: tidyverse
## ── Attaching packages ─────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ tibble  2.1.3     ✔ purrr   0.3.3
## ✔ tidyr   1.0.0     ✔ dplyr   0.8.3
## ✔ readr   1.3.1     ✔ stringr 1.4.0
## ✔ tibble  2.1.3     ✔ forcats 0.4.0
## ── Conflicts ────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ readr::col_factor()               masks scales::col_factor()
## ✖ purrr::discard()                  masks scales::discard()
## ✖ tidyr::expand()                   masks Matrix::expand()
## ✖ dplyr::filter()                   masks stats::filter()
## ✖ dplyr::lag()                      masks stats::lag()
## ✖ tidyr::pack()                     masks Matrix::pack()
## ✖ ggridges::scale_discrete_manual() masks ggplot2::scale_discrete_manual()
## ✖ dplyr::select()                   masks MASS::select()
## ✖ tidyr::unpack()                   masks Matrix::unpack()
require(pvclust)
## Loading required package: pvclust
require(dendextend)
## Loading required package: dendextend
## Registered S3 method overwritten by 'dendextend':
##   method       from   
##   text.pvclust pvclust
## 
## ---------------------
## Welcome to dendextend version 1.12.0
## Type citation('dendextend') for how to cite the package.
## 
## Type browseVignettes(package = 'dendextend') for the package vignette.
## The github page is: https://github.com/talgalili/dendextend/
## 
## Suggestions and bug-reports can be submitted at: https://github.com/talgalili/dendextend/issues
## Or contact: <tal.galili@gmail.com>
## 
##  To suppress this message use:  suppressPackageStartupMessages(library(dendextend))
## ---------------------
## 
## Attaching package: 'dendextend'
## The following object is masked from 'package:stats':
## 
##     cutree
#If the package "cellrangerRkit" has not been installed, use the following lines to install it from GitHub

# install.packages("devtools")
# install.packages("roxygen2")
# library(devtools)
# library(roxygen2)
# devtools::install_github("hb-gitified/cellrangerRkit", build_vignettes = FALSE)

require(cellrangerRkit)
## Loading required package: cellrangerRkit
## Loading required package: Biobase
## Loading required package: BiocGenerics
## Loading required package: parallel
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
## 
##     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
##     clusterExport, clusterMap, parApply, parCapply, parLapply,
##     parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:dplyr':
## 
##     combine, intersect, setdiff, union
## The following object is masked from 'package:Matrix':
## 
##     which
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, append, as.data.frame, basename, cbind, colnames,
##     dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
##     grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
##     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
##     rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
##     union, unique, unsplit, which, which.max, which.min
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: RColorBrewer
## Loading required package: bit64
## Loading required package: bit
## Attaching package bit
## package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
## creators: bit bitwhich
## coercion: as.logical as.integer as.bit as.bitwhich which
## operator: ! & | xor != ==
## querying: print length any all min max range sum summary
## bit access: length<- [ [<- [[ [[<-
## for more help type ?bit
## 
## Attaching package: 'bit'
## The following object is masked from 'package:base':
## 
##     xor
## Attaching package bit64
## package:bit64 (c) 2011-2012 Jens Oehlschlaegel
## creators: integer64 seq :
## coercion: as.integer64 as.vector as.logical as.integer as.double as.character as.bin
## logical operator: ! & | xor != == < <= >= >
## arithmetic operator: + - * / %/% %% ^
## math: sign abs sqrt log log2 log10
## math: floor ceiling trunc round
## querying: is.integer64 is.vector [is.atomic} [length] format print str
## values: is.na is.nan is.finite is.infinite
## aggregation: any all min max range sum prod
## cumulation: diff cummin cummax cumsum cumprod
## access: length<- [ [<- [[ [[<-
## combine: c rep cbind rbind as.data.frame
## WARNING don't use as subscripts
## WARNING semantics differ from integer
## for more help type ?bit64
## 
## Attaching package: 'bit64'
## The following object is masked from 'package:bit':
## 
##     still.identical
## The following object is masked from 'package:Biobase':
## 
##     cache
## The following objects are masked from 'package:BiocGenerics':
## 
##     match, order, rank
## The following objects are masked from 'package:base':
## 
##     :, %in%, is.double, match, order, rank
## Loading required package: Rmisc
## Loading required package: lattice
## 
## Attaching package: 'lattice'
## The following object is masked from 'package:boot':
## 
##     melanoma
## Loading required package: plyr
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
## The following object is masked from 'package:purrr':
## 
##     compact
# Before running, change the Proj.Home variable below to the file path of the parent folder containing Notebook.Rmd.
Proj.Home = "/Users/jacobn07/Documents/GFHK99_Multiplicity"

setwd(Proj.Home)

knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE, fig.margin = TRUE)
theme_set(theme_grey())

g_legend<-function(a.gplot){
  tmp <- ggplot_gtable(ggplot_build(a.gplot))
  leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box")
  legend <- tmp$grobs[[leg]]
  legend
}

## Bootstrap (r = 0.5)... Done.
## Bootstrap (r = 0.75)... Done.
## Bootstrap (r = 1.0)... Done.
## Bootstrap (r = 1.25)... Done.
## 'dendrogram' with 2 branches and 4 members total, at height 2.227811

## Bootstrap (r = 0.44)... Done.
## Bootstrap (r = 0.56)... Done.
## Bootstrap (r = 0.67)... Done.
## Bootstrap (r = 0.78)... Done.
## Bootstrap (r = 0.89)... Done.
## Bootstrap (r = 1.0)... Done.
## Bootstrap (r = 1.11)... Done.
## Bootstrap (r = 1.22)... Done.
## Bootstrap (r = 1.33)... Done.

## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_DF1_0.07 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_DF1_0.07 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_DF1_0.2 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_DF1_0.2 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_DF1_0.6 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_DF1_0.6 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_DF1_1.8 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_DF1_1.8 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_MDCK_0.07 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_MDCK_0.07 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_MDCK_0.2 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_MDCK_0.2 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_MDCK_0.6 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_MDCK_0.6 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using WT_MDCK_1.8 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/WT_MDCK_1.8 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.

## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using DF1_0.02 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/DF1_0.02 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using DF1_0.07 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/DF1_0.07 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using DF1_0.2 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/DF1_0.2 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using DF1_0.6 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/DF1_0.6 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using MDCK_0.02 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/MDCK_0.02 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using MDCK_0.07 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/MDCK_0.07 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using MDCK_0.2 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/MDCK_0.2 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## Searching for genomes in: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex 
## Using MDCK_0.6 in folder: /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/filtered_gene_bc_matrices_mex/MDCK_0.6 
## Loaded matrix information
## Loaded gene information
## Loaded barcode information
## Could not find summary csv: 
##   /Users/jacobn07/Documents/GFHK99_Multiplicity/Data/CellRanger_Output/outs/metrics_summary.csv.
## This file is only necessary if you are performing depth-normalization (calling the equalize_gbms function) in R.
## If this pipestance was produced by `cellranger aggr` with the default parameters, depth-normalization in R (via equalize_gbms) is not necessary.
## [1] 1873
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: WT ~ P3_NP + (1 | MOI)
##    Data: Norm.df1 %>% filter(Cell == "DF1")
## 
## REML criterion at convergence: 1803.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4141 -0.7288 -0.2562  0.7354  4.4126 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.3912   0.6255  
##  Residual             0.2486   0.4986  
## Number of obs: 1228, groups:  MOI, 4
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept) 1.175e+00  3.132e-01 3.004e+00   3.751    0.033 *  
## P3_NP       6.082e-01  3.441e-02 1.224e+03  17.677   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##       (Intr)
## P3_NP -0.026
## [1] 4.073803
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: WT ~ P3_NP + (1 | MOI)
##    Data: Norm.df1 %>% filter(Cell == "MDCK")
## 
## REML criterion at convergence: 593.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2200 -0.7376 -0.1163  0.6324  3.6811 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.5677   0.7534  
##  Residual             0.1406   0.3750  
## Number of obs: 645, groups:  MOI, 4
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)   1.00385    0.37713   2.99782   2.662   0.0763 .  
## P3_NP         0.38550    0.04631 641.02927   8.324 5.13e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##       (Intr)
## P3_NP -0.023
## [1] 2.454709
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: WT ~ P3_NP * Cell + (1 | MOI)
##    Data: Norm.df1
## 
## REML criterion at convergence: 2532.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4888 -0.7033 -0.2233  0.6479  4.5748 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.4129   0.6426  
##  Residual             0.2217   0.4709  
## Number of obs: 1873, groups:  MOI, 4
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)       1.17772    0.32169    3.00631   3.661   0.0351 *  
## P3_NP             0.58077    0.03193 1866.51899  18.188   <2e-16 ***
## CellMDCK         -0.22722    0.02639 1866.11271  -8.611   <2e-16 ***
## P3_NP:CellMDCK    0.01489    0.05568 1866.07896   0.267   0.7892    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) P3_NP  ClMDCK
## P3_NP       -0.024              
## CellMDCK    -0.030  0.269       
## P3_NP:CMDCK  0.014 -0.474 -0.479
## [1] 3.801894
## [1] 0.4376587
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: WT ~ Cell + (1 | MOI)
##    Data: Norm.df1
## 
## REML criterion at convergence: 2912.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1172 -0.6845 -0.1179  0.3882  4.2010 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.5762   0.7591  
##  Residual             0.2727   0.5222  
## Number of obs: 1873, groups:  MOI, 4
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)    1.31219    0.37986    3.00366   3.454   0.0407 *  
## CellMDCK      -0.24956    0.02565 1868.08101  -9.729   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##          (Intr)
## CellMDCK -0.024
## [1] 0.4376587
## [1] 0.7782794

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: value ~ variable + (1 | MOI)
##    Data: Melt.df2
## 
## REML criterion at convergence: 3050.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.3174 -0.7854  0.0074  0.7636  2.5500 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.2448   0.4948  
##  Residual             0.2961   0.5441  
## Number of obs: 1865, groups:  MOI, 4
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept) 1.185e+00  2.481e-01 3.017e+00   4.774   0.0172 *
## variableVAR 4.726e-02  2.522e-02 1.860e+03   1.874   0.0611 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## variableVAR -0.053
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Test ~ Cell * Help + (1 | MOI)
##    Data: Sum.df
## 
## REML criterion at convergence: 6353.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.1149 -0.6928 -0.0438  0.5786  3.9675 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.6928   0.8323  
##  Residual             0.3017   0.5492  
## Number of obs: 3845, groups:  MOI, 5
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              1.09332    0.37266    4.00891   2.934   0.0425 *  
## CellMDCK                -0.25449    0.02689 3837.07352  -9.464  < 2e-16 ***
## Helpw/ mVAR2             0.39627    0.02676 3838.28675  14.810  < 2e-16 ***
## CellMDCK:Helpw/ mVAR2    0.15808    0.03673 3837.03828   4.304 1.72e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) ClMDCK H/mVAR
## CellMDCK    -0.026              
## Helpw/mVAR2 -0.032  0.378       
## CMDCK:H/mVA  0.018 -0.729 -0.632
## [1] 0.4376587
## [1] 0.2056718
## [1] 1.490405
## [1] 2.583851
## [1] 2.818383
## [1] 3.630781
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Test ~ Cell * Help + (1 | MOI)
##    Data: Sum.df %>% filter(MOI < 0.6)
## 
## REML criterion at convergence: 4069.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5909 -0.7503 -0.1978  0.6255  3.4201 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  MOI      (Intercept) 0.1748   0.4180  
##  Residual             0.3773   0.6142  
## Number of obs: 2169, groups:  MOI, 3
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              0.64536    0.24313    2.03858   2.654    0.115    
## CellMDCK                -0.41472    0.04397 2163.01633  -9.432  < 2e-16 ***
## Helpw/ mVAR2             0.17251    0.03642 2163.88745   4.737 2.31e-06 ***
## CellMDCK:Helpw/ mVAR2    0.54853    0.05587 2163.14850   9.818  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) ClMDCK H/mVAR
## CellMDCK    -0.061              
## Helpw/mVAR2 -0.085  0.408       
## CMDCK:H/mVA  0.044 -0.788 -0.617

##          Rep     WT.Cells Helper.Cells 
##           10          102          253

## 
## Call:
## lm(formula = Pp ~ Rep, data = Exp.Pp.1 %>% mutate(Rep = Rep %>% 
##     factor(levels = c(1, 2, 3, 4, 5))))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.25875 -0.11031  0.01063  0.08812  0.22500 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.71500    0.04533  15.775  < 2e-16 ***
## Rep2        -0.05625    0.06410  -0.878  0.38618    
## Rep3        -0.05875    0.06410  -0.917  0.36565    
## Rep4        -0.12250    0.06410  -1.911  0.06421 .  
## Rep5        -0.24000    0.06410  -3.744  0.00065 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1282 on 35 degrees of freedom
## Multiple R-squared:  0.3186, Adjusted R-squared:  0.2407 
## F-statistic: 4.091 on 4 and 35 DF,  p-value: 0.007987
## 
## Call:
## lm(formula = Pp ~ Rep, data = Exp.Pp.1 %>% mutate(Rep = Rep %>% 
##     factor(levels = c(1, 2, 3, 4))))
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.25875 -0.10875  0.01063  0.06906  0.20375 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.71500    0.04253  16.811 3.66e-16 ***
## Rep2        -0.05625    0.06015  -0.935   0.3577    
## Rep3        -0.05875    0.06015  -0.977   0.3371    
## Rep4        -0.12250    0.06015  -2.037   0.0513 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1203 on 28 degrees of freedom
## Multiple R-squared:  0.1293, Adjusted R-squared:  0.03598 
## F-statistic: 1.386 on 3 and 28 DF,  p-value: 0.2676

##    PB2  PB1   PA   HA   NP  NA.    M   NS
## 1 0.59 0.59 0.76 0.69 0.76 0.69 0.80 0.84
## 2 0.55 0.55 0.63 0.40 0.72 0.81 0.85 0.76
## 3 0.48 0.48 0.54 0.72 0.86 0.66 0.79 0.72
## 4 0.61 0.57 0.57 0.65 0.54 0.46 0.69 0.65
## Time difference of 3.565018 mins